||
ErrorsCollection

||

Synthesised documentation from language/operators

From language/operators

See Original text in context

Returns the first argument that evaluates to True in Boolean context, otherwise returns the last argument.

Note that this short-circuits; i.e., if one of the arguments evaluates to a true value, the remaining arguments are not evaluated.

sub a { 0 }
sub b { 1 }
sub c { die "never called" };
say a() || b() || c();      # OUTPUT: «1␤»